import os
import shutil

# for i in range(1,13):
#     i=str(i) if i>=10 else '0'+str(i)
#     print(i,type(i),str(i),type(str(i)))
src=r"E:\黑马计算机\传智播客-Python基础视频\第1章：基础班预习视频\01-Python基础\01-Python基础\03-视频"
des=r"E:\黑马计算机\传智播客-Python基础视频\黑马黄老师python基础视频"

pathLst=[src.replace("01","0"+str(i)) if i<10 else src.replace("01",str(i)) for i in range(1,14)]
for path in pathLst:
    pathNum='0'+str(pathLst.index(path)+1) if pathLst.index(path)<9 else str(pathLst.index(path)+1)
    print("path",path,'\tpathNum:',pathNum)
    desPath=des+'\\'+pathNum
    print("desPath:",desPath)
    os.makedirs(desPath)
    for file in os.listdir(path):
        if "mp4" in file:
            full_file_name = os.path.join(path, file)  # 把文件的完整路径得到
            print("要被复制的文件的路径全名",full_file_name,type(full_file_name))
            shutil.copy(full_file_name,desPath)
